<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../asserts/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="../asserts/plugins/jquery-3.6.0.min.js"></script>
    <script src="../asserts/plugins/bootstrap/js/bootstrap.js"></script>
    <script>
        $(function () {
            // 获取个人信息
            $.ajax({
                url:"/KunKunMarket/UserController?type=getMyData",
                type:"get",
                dataType:"json",
                success:function (respBean) {
                    if (respBean.status == 500){
                        alert(respBean.msg);
                        return;
                    }
                    $("#myData").text('');
                    let id = respBean.data.id;
                    let username = respBean.data.username;
                    let password = respBean.data.password;
                    let user_type = respBean.data.user_type;
                    let money = respBean.data.money;
                    let sex = respBean.data.sex;
                    let phone = respBean.data.phone;

                    let $id = $("<p style='display: none'></p>");
                    let $username = $("<p></p>");
                    let $password = $("<p></p>");
                    let $user_type = $("<p></p>");
                    let $money = $("<p></p>");
                    let $sex = $("<p></p>");
                    let $phone = $("<p></p>");

                    $id.text(id);
                    $username.text(username);
                    $password.text(password);
                    $user_type.text(user_type);
                    $money.text(money);
                    $sex.text(sex);
                    $phone.text(phone);

                    $("#myData").append($id);
                    $("#myData").append($username);
                    $("#myData").append($password);
                    $("#myData").append($user_type);
                    $("#myData").append($money);
                    $("#myData").append($sex);
                    $("#myData").append($phone);

                }
            })
        })
    </script>
</head>
<body>
    <h1>用户首页</h1>
    <div class="container" id="myData">
        
    </div>
</body>
</html>